package org.zdw.data.structure.util;

public class CreateArray {

    /**
     * 获取数组数据
     * @return
     */
    public static int[] getArray(){
        int a[]={49,38,65,97,76,13,27,49,78,34,12,64,5,4,62,99,98,54,56,17,18,23,34,15,35,25,53,51};
        return a;
    }

    public static int[] getEasyArray(){
        int a[]={69,81,89,37,97,17,28,49,77,69};
        return a;
    }

    /**
     * 获取最坏情况下的排序数组
     * @return
     */
    public static int[] getBadArray(){
        int a[]={88,80,77,66,65,55,44,40,30,21};
        return a;
    }

    /**
     * 打印数组
     * @param array
     */
    public static void printArray(int[] array){
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0;i<array.length;i++){
            stringBuilder.append(array[i]+",");
        }
        stringBuilder.deleteCharAt(stringBuilder.lastIndexOf(","));
        System.out.println(stringBuilder.toString());
    }
}
